package es.xpt.ysf.commons.business.view;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map.Entry;
import java.util.Set;

import es.xpt.ysf.commons.business.model.Period;
import es.xpt.ysf.model.Item;

/**
 * Clase que modela el cambio entre dos divisas
 * Una divisa se modela con clase {@link es.xpt.ysf.commons.business.model.Currency}
 */
@SuppressWarnings(value="serial")
public class CurrencyExchangeModelView extends Item
{
	private String source;
	private String target;
	private HashMap<Period,BigDecimal> exchangeInPeriod = new HashMap<Period,BigDecimal>();
	
	public CurrencyExchangeModelView() { }
	
	public CurrencyExchangeModelView(String source, String target) 
	{
		this.source = source;
		this.target = target;
	}
	
	public Set<Entry<Period, BigDecimal>> getExchangeInPeriodEntrySet() { 
		return exchangeInPeriod.entrySet(); 
	}
	
	public HashMap<Period, BigDecimal> getExchangeInPeriod() { return exchangeInPeriod; }
	public void setExchangeInPeriod(HashMap<Period, BigDecimal> exchangeInPeriod) { this.exchangeInPeriod = exchangeInPeriod; }

	public String getSource() { return source; }
	public void setSource(String source) { this.source = source; }

	public String getTarget() { return target; }
	public void setTarget(String target) { this.target = target; }
}